home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / os2 / popsrv1i.zip / SENDMAIL.CF < prev   
Text File  |  1996-08-04  |  32KB  |  715 lines

  1. ########################################################################
  2. #                                                                      #
  3. #                                                                      #
  4. #  Sendmail                                                            #
  5. #  Copyright (c) 1983  Eric P. Allman                                  #
  6. #  Berkeley, California                                                #
  7. #                                                                      #
  8. #  Copyright (c) 1983 Regents of the University of California.         #
  9. #  All rights reserved.  The Berkeley software License Agreement       #
  10. #  specifies the terms and conditions for redistribution.              #
  11. #                                                                      #
  12. #  This configuration file was modified specifically for IBM's         #
  13. #  SENDMAIL product for the IBM OS/2 Operating System.  Please avoid   #
  14. #  making changes to this file, as it will change the operation of     #
  15. #  SENDMAIL.                                                           #
  16. #                                                                      #
  17. #  Modified by: Ed Overly    &   Daniel Barton       @ IBM             #
  18. #              Yorktown, NY  Research Triangle Park, NC                #
  19. ########################################################################
  20.  
  21. ########################################################################
  22. #                                                                      #
  23. # Host name definition (YOU MUST DEFINE THESE)                         #
  24. #                                                                      #
  25. # Define macro for your host name for all return addresses.            #
  26. # Define class to recognize all aliases of your host name.             #
  27. #                                                                      #
  28. # The domain will be added to this name!!! -mjz                        # 
  29. #                                                                      #
  30. #DwYourHostName                                                        #
  31. #CwYourHostName YourHostAliases                                        #
  32. ########################################################################
  33.  
  34. # My host name
  35. Dwhabcnx
  36. Cwhabcnx mail
  37.  
  38. ########################################################################
  39. #      SubDomains                                                      #
  40. #                                                                      #
  41. #      Receive mail for All users in this subdomains                   #
  42. #      in 'subdomain' mailbox                                          #
  43. #                                                                      #
  44. ########################################################################
  45.  
  46. Cxchanae mn2 prof etud
  47.  
  48. ########################################################################
  49. #                                                                      #
  50. # Local domain name. (DEFINE THIS IF DOMAINS ARE USED)                 #
  51. # **WARNING**                                                          #
  52. # When domain names are used, SMTP transactions utilize the            #
  53. # full domain (official) name of the host. All host names with         #
  54. # no domains (abbreviated) are expanded with the local domain          #
  55. # by the mail service. This is consistent with Internet text standards.#
  56. # All hosts sending or RECEIVING mail must recognize their official    #
  57. # host names. When using domains enter the official host name in       #
  58. # /etc/hosts and be certain that all network nameservers recognize     #
  59. # official host names.                                                 #
  60. #                                                                      #
  61. # Define the D macro to be the whole domain for the local host.        #
  62. # This configuration file supports four part domains. It can be        #
  63. # expanded to support n part domains.                                  #
  64. #                                                                      #
  65. #DDgrandchild.child.parent.top                                         #
  66. ########################################################################
  67.  
  68. # My domain name
  69. DDstben.be
  70.  
  71. ########################################################################
  72. #                                                                      #
  73. # Relay host definition (You may optionally define this)               #
  74. #                                                                      #
  75. # If the Relay host is defined, then all outbound mail is delivered    #
  76. # to this Relay host.                                                  #
  77. #                                                                      #
  78. #DRyourRelayHost     (Fully qualified)                                 #
  79. ########################################################################
  80.  
  81. #DRtornix.tornado.be
  82.  
  83. ########################################################################
  84. #                                                                      #
  85. # Host name for UUCP handling (YOU MAY OPTIONALLY DEFINE THIS)         #
  86. #                                                                      #
  87. # Optionally define macro specifying name of host to which you want    #
  88. # to relay all UUCP traffic.  This would be a host on the network      #
  89. # with modems.  You do not have to define this to use UUCP.            #
  90. #                                                                      #
  91. # Defining this macro eliminates the requirement for you to explicitly #
  92. # reference the relaying host in your UUCP route addresses.  For       #
  93. # instance, if the host with modems is called "cat", you normally      #
  94. # would have to specify a UUCP address as "cat!route_path".  If you    #
  95. # define macro "DUcat", then you only need specify "route_path".       #
  96. #                                                                      #
  97. #DUHostWithModems                                                      #
  98. #                                                                      #
  99. ########################################################################
  100.  
  101. # my official host name (includes host name and domain name)
  102. Dj$w$?D.$D$.
  103.  
  104.  
  105. #####################################################
  106. #   Version Number   (YOU MAY CHANGE THIS AS NEEDED)#
  107. #####################################################
  108. DZ1.0
  109.  
  110.  
  111. ######################
  112. #   Special macros   #
  113. ######################
  114.  
  115. # my name
  116. DnMAILER-DAEMON
  117. # UNIX header format
  118. DlFrom $g  $d
  119. # delimiter (operator) characters
  120. Do.:%@!^=/[]
  121. # format of a total name
  122. Dq$g$?x ($x)$.
  123. # SMTP login message
  124. De$j Sendmail $v/$Z ready at $b
  125.  
  126.  
  127. ###############
  128. #   Options   #
  129. ###############
  130.  
  131. # location of alias file
  132. OAf:\tcpip\etc\aliases
  133.  
  134. # substitution for space (blank) characters
  135. OB.
  136.  
  137. # (don't) connect to "expensive" mailers
  138. #Oc
  139.  
  140. # default delivery mode
  141. Odbackground
  142.  
  143. # location of help file
  144. OHf:\tcpip\etc\sendmail.hf
  145.  
  146. # Queue directory - specify directory containing log file
  147. OQe:\mqueue
  148.  
  149. # default messages to old style
  150. Oo
  151.  
  152. # status file
  153. OSf:\tcpip\etc\sendmail.st
  154.  
  155. # queue up everything before starting transmission
  156. Os
  157.  
  158. # return queued mail after this long
  159. OT1d
  160.  
  161. # load average at which we refuse connections
  162. #OX
  163.  
  164. # work recipient factor
  165. #Oy
  166.  
  167. # work msg class factor
  168. #Oz
  169.  
  170. # work time factor
  171. #OZ
  172.  
  173.  
  174. ###########################
  175. #   Message precedences   #
  176. ###########################
  177.  
  178. Pfirst-class=0
  179. Pspecial-delivery=100
  180. Pbulk=-60
  181. Pjunk=-100
  182.  
  183.  
  184. #####################
  185. #   Trusted users   #
  186. #####################
  187.  
  188. #  This parameter is not used by OS/2 Sendmail. 
  189. Tdaemon
  190.  
  191.  
  192. #########################
  193. #   Format of headers   #
  194. #########################
  195.  
  196. H?P?Return-Path: <$g>
  197. HReceived: $?sfrom $s $.by $j ($v/$Z)
  198.       id $i; $b
  199. H?D?Resent-Date: $a
  200. H?D?Date: $a
  201. H?F?Resent-From: $q
  202. H?F?From: $q
  203. H?x?Full-Name: $x
  204. HSubject:
  205. # HPosted-Date: $a
  206. # H?l?Received-Date: $b
  207. H?M?Resent-Message-Id: <$t.$i@$j>
  208. H?M?Message-Id: <$t.$i@$j>
  209.  
  210.  
  211. ########################################################################
  212. #                                                                      #
  213. #                          REWRITING RULES                             #
  214. #                                                                      #
  215. ########################################################################
  216.  
  217.  
  218. ########################################################################
  219. #                                                                      #
  220. #  The Complete Specification of Canonical Syntax is:                  #
  221. #                                                                      #
  222. #   <ahost>       ::= /* ARPA type host name */                        #
  223. #   <uhost>       ::= /* UUCP type host name */                        #
  224. #   <user>        ::= /* target user name */                           #
  225. #                                                                      #
  226. #   <route_node>  ::= @<ahost>: | <uhost>!                             #   
  227. #   <route_path>  ::= <NULL> | <route_node> | <route_path><route_node> #
  228. #   <target>      ::= <user> | <user>@<ahost>                          #
  229. #                                                                      #
  230. #   <address>     ::= <route_path><target>                             #
  231. #                                                                      #
  232. #  This is what we handle, but actually we only look at the minimum    #
  233. #  required to pass the mail on.  Intermediaries with other syntax/    #
  234. #  semantics may be used, provided the addressing is compatible with   #
  235. #  them when the mail arrives there.                                   #
  236. #                                                                      #
  237. ########################################################################
  238.  
  239.  
  240. ########################################################################
  241. #                                                                      #
  242. #                  THE DYNAMIC MACROS $f AND $g                        #
  243. #                                                                      #
  244. #  Macro $f is defined by the sender address as known the current      #
  245. #  host, via the ruleset sequence:  3, 1, 4.                           #
  246. #                                                                      #
  247. #  Macro $g is defined at delivery time for each separate mailer via   #
  248. #  the ruleset sequence:  3, 1, mailer-S, 4.                           #
  249. #                                                                      #
  250. #  The SMTP "MAIL FROM" address will be $g.                            #
  251. #                                                                      #
  252. #  $g is included in many headers and will be expanded if the header   #
  253. #  is newly created by sendmail.                                       #
  254. #                                                                      #
  255. ########################################################################
  256.  
  257.  
  258. ########################################################################
  259. #                                                                      #
  260. #                         THE SMTP INTERFACE                           #
  261. #                                                                      #
  262. #  The SMTP "MAIL FROM" address will be $g.                            #
  263. #                                                                      #
  264. #  The SMTP "RCPT TO" addresses will be computed from the recipient    #
  265. #  addresses in sendmail by applying the same ruleset sequence as for  #
  266. #  "to" headers:  namely, rulesets 3, 2, mailer-R, 4                   #
  267. #                                                                      #
  268. ########################################################################
  269.  
  270.  
  271. ########################################################################
  272. #                                                                      #
  273. #  S1:  Sender Field Pre-rewriting                                     #
  274. #                                                                      #
  275. #  This ruleset is used when defining the $f macro.  In this case it   #
  276. #  is applied after S3 and before S4.                                  #
  277. #                                                                      #
  278. #  This ruleset is applied to all sender type headers after S3 and     #
  279. #  before the mailer specific sender (S) rewrite rules.                #
  280. #  This ruleset is also applied to $f to create $g.                    #
  281. #                                                                      #
  282. ########################################################################
  283. S1
  284.  
  285.  
  286. ########################################################################
  287. #                                                                      #
  288. #  S2:  Recipient Field Pre-rewriting                                  #
  289. #                                                                      #
  290. #  This ruleset is applied to the user part of the 3-tuple output from #
  291. #  S0.  It is followed by application of the mailer specific recipient #
  292. #  [R] rewrite rules.                                                  #
  293. #                                                                      #
  294. #  This ruleset is applied to all recipient type headers after S3 and  #
  295. #  before the mailer specific recipient (R) rewrite rules.             #
  296. #  This ruleset is likewise used to reform the "to" address for SMTP.  #
  297. #                                                                      #
  298. ########################################################################
  299. S2
  300.  
  301.  
  302. ########################################################################
  303. #                                                                      #
  304. #  S4:  Final Output Post-rewriting   (Return to standard form)        #
  305. #                                                                      #
  306. #  This ruleset is applied to the user part of the 3-tuple produced    #
  307. #  from ruleset 0.  It is applied after the mailer specific recipient  #
  308. #  [R] rules.                                                          #
  309. #                                                                      #
  310. #  This ruleset is applied after S1 when defining the $f macro.        #
  311. #  This ruleset is applied last when creating the $g macro from $f.    #
  312. #                                                                      #
  313. #  This ruleset is applied to all headers after the mailer specific    #
  314. #  rewrite rules (whether recipient or sender) have been applied.      #
  315. #  This ruleset is applied last when computing the RCPT TO address for #
  316. #  SMTP.                                                               #
  317. #                                                                      #
  318. ########################################################################
  319. S4
  320.  
  321. #
  322. #  Change LOCAL or LOCAL.D to the real name.
  323. #
  324. R$*<@LOCAL>$*        $:$1<@$w>$2
  325. R$*<@LOCAL.D>$*        $:$1<@$w$?D.$D$.>$2
  326. R$*<@$-.LOCAL>$*    $:$1<@$2$?D.$D$.>$3
  327.  
  328. R$*<LOCAL>$*        $:$1<$w>$2
  329. R$*<LOCAL.D>$*        $:$1<$w$?D.$D$.>$2
  330. R$*<$-.LOCAL>$*        $:$1<$2$?D.$D$.>$3
  331.  
  332. #
  333. #  Remove focus brackets.
  334. #
  335. R$*<$+>$*        $1$2$3
  336.  
  337.  
  338. ########################################################################
  339. #                                                                      #
  340. #  S3:  Address Canonicalization  (Internal rewriting form)            #
  341. #                                                                      #
  342. #  This ruleset turns an address in external format into a format      #
  343. #  which simplifies internal rewriting.  The inverse ruleset is S4.    #
  344. #  This ruleset is applied first to any external address before other  #
  345. #  rewriting is done.                                                  #
  346. #                                                                      #
  347. #  This concept of canonicalization is to be distinguished from usage  #
  348. #  of the nameserver in the $[/$] construct inside the RHS of rewrite  #
  349. #  rules.  This is also sometimes called "canonicalization", but has   #
  350. #  to do not with the syntax of the address but with obtaining the     #
  351. #  correct domain name for the address.                                #
  352. #                                                                      #
  353. #  No stripping of local domains is done for route addresses:          #
  354. #  Rulesets which require this must do it themselves by iteratively    #
  355. #  stripping LOCAL or LOCAL.D and recalling this ruleset to            #
  356. #  canonicalize the next host.item.                                    #
  357. #                                                                      #
  358. #  The term "localization" refers to determining whether the next host #
  359. #  item is really a reference to the current host.  Localization       #
  360. #  assumes that local UUCP host names are in class w.  This is not     #
  361. #  strictly a necessary restriction, but it simplifies the network     #
  362. #  concept and also makes for simpler rewrite rules.  This ruleset     #
  363. #  replaces explicit instances of local host with the internally       #
  364. #  recognized tag "LOCAL" or "LOCAL.D".                                #
  365. #                                                                      #
  366. #  Addresses which do not specify a host name for routing or domain    #
  367. #  will NOT have any reference to the local host appended in any way.  #
  368. #                                                                      #
  369. ########################################################################
  370. S3
  371.  
  372. #
  373. #  Basic textual canonicalization -- note RFC733 heuristic here.
  374. #  This strips off everything but the innermost list between <>'s.
  375. #  Some addresses are of the format: Full Name <address>
  376. #
  377. R$*<$*<$*<$+>$*>$*>$*    $4        3-level <> nesting
  378. R$*<$*<$+>$*>$*        $3        2-level <> nesting
  379. R$*<$+>$*        $2        basic RFC821/822 parsing
  380.  
  381. #
  382. #  Turn an "at" token into "@".
  383. #
  384. #  The I macro specifies space or some equivalent char defined by the OI
  385. #  config option above.
  386. #
  387. #R$+ at $+        $:$1@$2        "at" -> "@" for RFC 822
  388.  
  389. #  Change a%b to a@b. This implies that we support a%b%c... as a route
  390. #  based address from right to left.
  391. #  This form of addressing should go away as full domains are supported.
  392. #
  393. R$+%$-            $1@$2
  394.  
  395. #  ====> NOTE <====
  396. #  This configuration file always evaluates mix mode addresses from
  397. #  left to right. No precedence between @ and ! is assumed. The
  398. #  address a!b@c will resolve to the uucp mailer for the remote host
  399. #  'a'. This permits the resolution of very complex route based
  400. #  addresses such as; @a:@b:c!d!user, a!@b:c!user, a!@b.uucp:user@c.
  401. #  Return addresses on mail to/from AIX level 4 machines are also
  402. #  correct. If you wish the address a!b@c to resolve to the TCP
  403. #  mailer for the remote host 'c' then uncomment the following rewrite
  404. #  rule. This approach is compatible with older versions of sendmail.
  405.  
  406. #  Change a!b@c to @c:a!b
  407. R$-!$-@$+        @$3:$1!$2
  408.  
  409. #
  410. #  Change commas to colons for route addresses.
  411. #
  412. R$+,$+            $1:$2
  413.  
  414. #
  415. #  Pick out route addresses.  Focus and call localizer.
  416. #
  417. R@$+:$+            $@$>9<@$1>:$2        handle <route-addr>
  418. R$-!$+            $@$>8<$1>!$2        UUCP route
  419.  
  420. #  Detect domain!user. Internally convert to user@domain (RFC976).
  421. #  Rule set 8 will detect local addresses and strip any trailing
  422. #  periods.
  423. R$-.$*!$+                $@$>8<$1.$2>!$3
  424.  
  425. #
  426. #  Detect local domain for nonroute addresses.  Focus and localize.
  427. R$+@$+            $:$1<@$2>
  428. #R$+<@$=w.$D>        $@$1<@LOCAL.D>
  429. #R$+<@$=w>        $@$1<@LOCAL>
  430. R$+<@$=w.UUCP>        $@$1<@LOCAL>
  431.  
  432. #
  433. #  Anything else is left as-is!  This includes simple names.
  434. #  They will NOT have an appended domain.
  435. #  This is so the $f macro definition will be the sender address
  436. #  as known locally.
  437. #
  438.  
  439.  
  440. ########################################################################
  441. #                                                                      #
  442. #  S9:    Localize ARPA type route path.                                 #
  443. #                                                                      #
  444. #  This is used only by S3.                                            #
  445. #                                                                      #
  446. ########################################################################
  447. S9
  448.  
  449. R<@$=w.$D>:$*            $@<@LOCAL>:$2
  450. R<@$=w>:$*            $@<@LOCAL>:$2
  451. R<@$D>:$*            $@<@LOCAL>:$2
  452. R<@$=w.UUCP>:$*            $@<@LOCAL>:$2
  453.  
  454. ########################################################################
  455. #                                                                      #
  456. # S8:  Localize UUCP route path.  This is used only by S3.             #
  457. #                                                                      #
  458. ########################################################################
  459. #S8
  460.  
  461. #R<$=w.$D>!$+            $@<LOCAL.D>!$2
  462. #R<$=w>!$+            $@<LOCAL>!$2
  463. # We have a non-local domain. Change to user@domain for resolution.
  464. #R<$-.$+>!$+            $@<@$1.$2>:$3
  465. #R<$+.>!$+            $@<@$1>:$2
  466.  
  467. ########################################################################
  468. #                                                                      #
  469. #                              MAILERS                                 #
  470. #                                                                      #
  471. ########################################################################
  472.  
  473.  
  474. ########################################################################
  475. #                                                                      #
  476. #               Local and Program Mailer specification                 #
  477. #                                                                      #
  478. ########################################################################
  479.  
  480. Mlocal, P=f:\tcpip\bin\mail.exe, F=lnsDFMP,  S=10, R=20, A=e:\mail $u $f
  481. Mprog,  P=/bin/sh,         F=lsDFM,   S=10, R=20, A=sh -c $u
  482.  
  483.  
  484. ########################################################################
  485. #                                                                      #
  486. #  S10:  Local/Prog Mailers Sender rules                               #
  487. #                                                                      #
  488. ########################################################################
  489. S10
  490.  
  491. ########################################################################
  492. #                                                                      #
  493. #  S20:  Local/Prog Mailers Recipient rules                            #
  494. #                                                                      #
  495. ########################################################################
  496. S20
  497.  
  498.  
  499. ########################################################################
  500. #                                                                      #
  501. #                     UUCP Mailer Specification                        #
  502. #                                                                      #
  503. ########################################################################
  504.  
  505. #Muucp,    P=/usr/bin/uux, F=DFMhuU, S=13, R=23, M=100000,
  506. #    A=uux - -r -n -a$f -gC $h!rmail ($u)
  507.  
  508.  
  509. ########################################################################
  510. #                                                                      #
  511. #                      TCP Mailer Specification                        #
  512. #                                                                      #
  513. ########################################################################
  514.  
  515. Mtcp,     P=[IPC], F=mDFMueXL,  S=14, R=24, A=IPC $h
  516.  
  517.  
  518. ########################################################################
  519. #                                                                      #
  520. #  S14:  TCP Mailer Sender Rules                                       #
  521. #                                                                      #
  522. #  This ruleset is applied in the following circumstances:             #
  523. #                                                                      #
  524. #  1)  To process sender type headers.  These have header names:       #
  525. #                                                                      #
  526. #       "resent-sender"                                                #
  527. #       "resent-from"                                                  #
  528. #       "resent-reply-to"                                              #
  529. #       "sender"                                                       #
  530. #       "from"                                                         #
  531. #       "reply-to"                                                     #
  532. #       "return-receipt-to"                                            #
  533. #       "errors-to"                                                    #
  534. #                                                                      #
  535. #  2)  To define the $g macro from the $f macro.                       #
  536. #                                                                      #
  537. #  In either case, it is applied after ruleset 1, and is followed by   #
  538. #  ruleset 4.                                                          #
  539. #                                                                      #
  540. #  Watch out if one of those headers is newly created and includes the #
  541. #  expanded $g macro!  This ruleset will have been used to create $g,  #
  542. #  and will then be applied to the result of the expansion of $g.      #
  543. #  This ruleset must handle this!                                      #
  544. #                                                                      #
  545. #  The $g macro is used in many places.                                #
  546. #                                                                      #
  547. ########################################################################
  548. S14
  549.  
  550. #
  551. #  We have just canonicalized a From: address or the $f macro.  Remove
  552. #  any instances of local host from route addresses.  This also works
  553. #  to take care of the instance of a newly expanded $g in a new
  554. #  From: line.
  555. #
  556. R<$*LOCAL$*>$-$+    $>3$4
  557.  
  558. #
  559. #  Prepend our domain to route based paths that come through.
  560. #
  561. R<$+>$+            $@<@LOCAL.D>:$1$2
  562.  
  563. #
  564. #  Fully qualify our domain.
  565. #
  566. R$+<@LOCAL>        $@$1<@LOCAL.D>
  567.  
  568. #
  569. #  Fully qualify other hosts in our local domain.
  570. #
  571. R$+<@$->        $@$1<@$2.LOCAL>
  572.  
  573. #
  574. #  Leave all other typical domain addresses alone.
  575. #
  576. R$+<$+>            $@$1<$2>
  577.  
  578. #
  579. #  Append full local domain where none exists at all.
  580. #
  581. R$+            $@$1<@LOCAL.D>
  582.  
  583.  
  584. ########################################################################
  585. #                                                                      #
  586. #  S24:  TCP Mailer Recipient rules                                    #
  587. #                                                                      #
  588. #  This ruleset is applied in the following cases:                     #
  589. #                                                                      #
  590. #  1)  To process recipient type headers being sent out through this   #
  591. #      mailer.  These headers are the ones with header names:          #
  592. #                                                                      #
  593. #       "to"                                                           #
  594. #       "resent-to"                                                    #
  595. #       "cc"                                                           #
  596. #       "resent-cc"                                                    #
  597. #       "bcc"                                                          #
  598. #       "resent-bcc"                                                   #
  599. #                                                                      #
  600. #     but NOT:                                                         #
  601. #                                                                      #
  602. #       "Apparently-to"                                                #
  603. #                                                                      #
  604. #  2)  To process the user part of the 3-tuple from S0 which resolves  #
  605. #      to this mailer.  This is the complete "to" address for ordinary #
  606. #      tcp usage, or is the original UUCP path if we are relaying      #
  607. #      using DU.                                                       #
  608. #                                                                      #
  609. #  3)  To process the "to" address to form the SMTP RCPT TO address.   #
  610. #                                                                      #
  611. #  In all cases, this ruleset is applied after ruleset 2, and is       #
  612. #  followed by ruleset 4.                                              #
  613. #                                                                      #
  614. #  Remember that this ruleset applies to all "to" type headers in the  #
  615. #  mail transmitted via this mailer.  This does not include            #
  616. #  "Apparently-to:" headers.  Not all "To:" headers point to the       #
  617. #  current mail target!  For instance, if the mail originated on this  #
  618. #  host and some targets were local, there may be local "To:" headers  #
  619. #  that must be processed by this ruleset!  The idea here is to make   #
  620. #  sure that the headers will be properly understood in the context of #
  621. #  the next host to which the mail will go.                            #
  622. #                                                                      #
  623. ########################################################################
  624. S24
  625.  
  626. #
  627. #  Leave route based addresses alone.  They are already completely intelligible
  628. #  in any context.
  629. #
  630. R<$+>$+            $@<$1>$2
  631.  
  632. #
  633. #  Fully qualify our host name with full domain.
  634. #
  635. R$+<@LOCAL>        $@$1<@LOCAL.D>
  636.  
  637. #
  638. #  Fully qualify nonlocal host names in our local domain.
  639. #
  640. R$+<@$->        $@$1<@$2.LOCAL>
  641.  
  642. #
  643. #  Leave all other typical domain addresses alone.
  644. #
  645. R$+<$+>            $@$1<$2>
  646.  
  647. #
  648. #  Append full local domain where none exists at all.  This handles the
  649. #  case of local targets whose (missing) host would cause misunderstanding
  650. #  in the next host.
  651. #
  652. R$+            $@$1<@LOCAL.D>
  653.  
  654.  
  655. ########################################################################
  656. #                                                                      #
  657. #      Rule Zero                                                       #
  658. #                                                                      #
  659. #  Resolve sender or recipient address to mailer/host/user 3-tuple.    #
  660. #  This may require iteration in use of S3 to strip leading route      #
  661. #  items which pertain to the current host.                            #
  662. #                                                                      #
  663. #  Sendmail will pass the user portion of the 3-tuple through ruleset  #
  664. #  2 + the mailer specific recipient ruleset + ruleset 4.              #
  665. #                                                                      #
  666. ########################################################################
  667. S0
  668.  
  669. #
  670. #  Handle route addresses that begin with LOCAL or LOCAL.D
  671. #
  672. R<$*LOCAL$*>$-$+    $>3$4
  673.  
  674. #  Change a%b<$*> to <$*>:a@b.
  675. #  This form of addressing should go away as full domains are supported.
  676. #
  677. R$+%$-<$*>        <$3>:$1@$2
  678. #
  679. #  Handle explicit local delivery.
  680. #
  681. #  The entire prefix is treated as local user.
  682. R$+<@LOCAL$*>        $#local$:$1
  683. R$+<@$D>        $#local$:$1
  684. R$+<@$=w.$D>        $#local$:$1
  685. R$+<@$=w>        $#local$:$1
  686. R$+<@$*$=x.$D>        $#local$:$3
  687. #
  688. #  Resolve UUCP to local uucp mailer or remote one via tcp.
  689. #  For tcp relay, user is full uucp route.  For uucp mailer, user is
  690. #  the uucp route as seen from the next host.
  691. #  UUCP host names are not passed through the nameserver canonicalizer.
  692. #
  693. #R$+<@$-.UUCP>         $?U$#tcp$@$U$:$1<@$2.UUCP>$|$#uucp$@$2$:<$1>$.
  694. #R<@$-.UUCP>:$+         $?U$#tcp$@$U$:<@$1.UUCP>:$2$|$#uucp$@$1$:<$2>$.
  695. #R<$->!$+         $?U$#tcp$@$U$:<$1>!$2$|$#uucp$@$1$:<$2>$.
  696.  
  697. #
  698. #  Canonicalize anything else which has an @focus.  This excludes simple
  699. #  names, which are local.
  700. #
  701. R$*<@$+>$*        $:$1<@$[$2$]>$3
  702.  
  703. #
  704. #  Send domain address to tcp.  This includes domain literals [IP quads].
  705. #  User is full focused path.
  706. #
  707. R$*<@$+>$*        $#tcp$@$?R$R$|$2$.$:$1<@$2>$3
  708.  
  709. #
  710. #  Remaining names must be local.
  711. #  User is whatever is left.
  712. #
  713. R$+            $#local$:$1
  714.